<?php include template("header");?>

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="credit">
	<div class="dashboard" id="dashboard">
		<ul><?php echo current_account('/meus_pontos'); ?></ul>
	</div>
    <div id="content">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>Troca de pontos</h2>
                    <ul class="filter">
						<li class="label">Categorias: </li>
						<?php echo current_credit_index('goods'); ?>
					</ul>
                </div>
                <div class="sect">
					<h3 class="credit-title">você tem <strong><?php echo moneyit2($login_user['score']); ?> </strong>pontos</h3>
					<ul style="padding:10px;">
					<?php if(is_array($goods)){foreach($goods AS $index=>$one) { ?>
						<li style="width:32%; float:left; text-align:center;">
							<div>
								<a href="/team.php?id=<?php echo $one['id']; ?>" title="<?php echo $one['title']; ?>" target="_blank"><img alt="<?php echo $one['title']; ?>" src="<?php echo team_image($one['image'], true); ?>" width="160" height="121"></a>
							</div>
							<div>
								<p class="total">Quant. trocada:<strong class="count"><?php echo $one['consume']; ?></strong></p>
								<p class="total">Pontos necessário:<strong class="count"><?php echo $one['score']; ?></strong></p>
								<p class="price"><a href="/credit/ajax.php?id=<?php echo $one['id']; ?>&action=exchange" class="ajaxlink">Eu quero trocar</a></p>
							</div>
						</li>
					<?php }}?>
					</ul>
					<div class="clear"></div>
					<div><?php echo $pagestring; ?></div>
				</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
    <div id="sidebar">
		<?php include template("block_side_credit");?>
		<?php include template("block_side_credittip");?>
    </div>
</div>

</div> <!-- bd end -->
</div> <!-- bdw end -->

<?php include template("footer");?>
